<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>爱康金服</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../css/normalize.css">
    <link rel="stylesheet" href="../css/flexslider.css">
    <link rel="stylesheet" href="../css/xxy.css">

    <!--[if lt IE 9]>
    <script src="../js/html5shiv.js"></script>
    <![endif]-->
</head>
<body>
<!--header-->
<header>
    <div class="topbar">
        <div class="container">
            <span class="pull-left">客服热线：400-969-8588</span>
            <a href="#">登录</a>
            <a class="active" href="#">注册</a>
            <a href="#">移动端</a>
        </div>
    </div>
    <div class="main-hd">
        <div class="container">
            <a class="logo" href="#"></a>
            <div class="primaryNavigation">
                <nav>
                    <ul class="nav-top">
                        <li><a href="#">首页</a></li>
                        <li><a href="#">散标</a></li>
                        <li><a href="#">我的账户</a></li>
                        <li><a href="#">新手指引</a></li>
                        <li><a href="#">安全保障</a></li>
                    </ul>
                </nav>
            </div>
        </div>
    </div>
</header>
<!--/heaer-->
<!--index-partner-->
<div class="register">
    <div class="container">
        <div class="login-reg-title">注册</div>
        <div class="login-reg-body reg-ing"><!--注册进行中 reg-ing -->
            <div class="lr-body-con">
                <div class="lr-body-item">
                    <div class="lr-body-conBox">
                        <input class="lr-text" type="text"
                               onpause="return false;" placeholder="请输入手机号码" name="username">
                        <!--当成功的时候给label-state blank加succeed，给label-state error里面清空-->
                        <!--当错误提示的时候label-state blank删掉succeed，给label-state error里面加内容-->
                        <label class="label-state error">
                            <i class="lr-icon icon-success"></i>
                        </label>
                    </div>
                </div>
                <div class="lr-body-item">
                    <div class="lr-body-conBox">
                        <input id="password" class="lr-text" type="password"
                               onpause="return false;" placeholder="请输入密码" name="password">
                        <span id="passwordEye" class="password-eye password-eye-close"></span>
                        <!-- <label class="label-state error">
                            <i class="lr-icon icon-error"></i>
                            123
                        </label> -->
                    </div>
                </div>
                <div class="lr-body-item">
                    <div class="lr-body-conBox">
                        <input class="lr-text lr-text-half" type="text"
                               onpause="return false;" placeholder="请输入验证码" name="imageCode">
                        <img class="yzm" src="/code/image" alt="">
                        <!-- <label class="label-state error">
                            <i class="lr-icon icon-error"></i>
                            密码错误
                        </label> -->
                    </div>
                </div>
                <div class="lr-body-item">
                    <div class="lr-body-conBox">
                        <input class="lr-text lr-text-half" type="text"
                               onpause="return false;" placeholder="请输入手机验证码" name="smsCode">
                        <a class="btn btn-default btn-yzm" href="#">获取验证码</a>
                        <!-- <label class="label-state error">
                            <i class="lr-icon icon-error"></i>
                            密码错误
                        </label> -->
                    </div>
                </div>
                <div class="lr-body-item">
                    <div class="lr-body-conBox lr-agreement">
                        <input id="lr-agreement" type="checkbox" checked="checked">
                        <label class="lr-label-agreement" for="lr-agreement">
                            我已阅读并同意爱康金服《网站注册协议》
                        </label>
                    </div>
                </div>
                <div class="lr-body-item3">
                    <div class="lr-body-conBox">
                        <a class="btn btn-default btn100" href="#">确认</a>
                    </div>
                </div>
            </div>
            <div class="lr-body-aside">
                <div class="lr-body-asideitem">
                    <span class="icon-indexbig icon-1"></span>
                    <dl class="simple-prointrDL">
                        <dt>互联网+供应链金融</dt>
                        <dd>国内首家16年产业积淀<br/>
                            专注细分领域
                        </dd>
                    </dl>
                </div>
                <div class="lr-body-asideitem">
                    <span class="icon-indexbig icon-2"></span>
                    <dl class="simple-prointrDL">
                        <dt>100%安全保障</dt>
                        <dd>上市公司背景<br/>
                            阳光保险承保千万备用金
                        </dd>
                    </dl>
                </div>

            </div>
        </div>
        <div class="login-reg-body reg-suceess " style="display: none;"><!--注册成功-->
            <div class="suceess-box">
                <span class="icon64-relevant icon64-suceess"></span>
                <div class="describe-icon">恭喜您，注册成功</div>
                <a class="btn btn-default" href="#">去抢购</a>
            </div>
        </div>
    </div>
</div>
<!--/index-partner-->
<!--footer-->
<footer>
    <div class="container">
        <div class="pull-left">
            <nav>
                <a href="/aboutUs/siteIntro.html?nid=about">关于爱碳邦</a>|
                <a href="/help/security.html">安全保障</a>|
                <a href="/aboutUs/joinUs.html">加入我们</a>|
                <a href="/help/guide.html">帮助中心</a>|
                <a href="">客户端下载</a>
            </nav>
            <p class="copyright">
                Copyright&copy; 2015 爱康富罗纳金融信息服务有限公司 版权所有 沪ICP备15045399号 投资有风险，购买需谨慎
            </p>
        </div>
        <div class="pull-right">
            <div class="ewm">
                <img src="../images/footer/footerewm.jpg" alt=""><br/>
                微信公众号
            </div>
            <div class="footer-info">
                客服热线 ( 09:00-18.00 )<br/>
                400-969-8588<br/>
                客服邮箱<br/>
                service@aikang.com
            </div>
        </div>
    </div>
</footer>
<!--/footer-->
<div class="popup-mask" style="display: none;"></div>
<div class="popup" style="display: none;">
    <div class="popup-tit">
        <span>温馨提示</span>
        <a href="" class="icon-colseBox" data-action='close'>
            <i class="icon16 icon-colse"></i>
        </a>
    </div>
    <div class="popup-body">
        <div class="popup-bodyText text-center">
            <div class="suceess-box">
                <span class="icon64-relevant icon64-suceess"></span>
                <div class="describe-icon">恭喜您，注册成功</div>
            </div>
            <div class="popup-bodyText-con">
                请在投资前完成风险测评，只需10秒哦~
            </div>
        </div>
        <div class="popup-bodyBtn ">
            <a class="btn btn-default2" href="/home/home.html">好的</a>
        </div>
    </div>
</div>
<script src="../js/jquery-1.9.1.min.js"></script>
<script src="../js/jquery.flexslider-min.js"></script>
<script src="../js/xxy.js"></script>
<!--[if lt IE 10]>
<script src="../js/placeholder.js"></script>
<![endif]-->
<script>
    $(function() {
        //点击眼睛图标显示或隐藏密码
        $('#passwordEye').on('click',function(){
            var $that = $(this);
            if($('#password').attr('type') == 'password'){
                $that.removeClass('password-eye-close');
                $('#password').attr('type','text');
            }else if($('#password').attr('type') == 'text'){
                $that.addClass('password-eye-close');
                $('#password').attr('type','password');
            }
        });
        
        $(".btn100").click(function(){
        	var $that = $(this);
        	$.ajax({
        		url:"/user/regist",
        		type:"post",
        		dataType:"json",
        		data:{
        			username:$("input[name='username']").val(),
            		password:$("input[name='password']").val(),
            		smsCode:$("input[name='smsCode']").val(),
        		},
        		success:function(){
        			$(".popup-mask").show();
        			$(".popup").show();
        		},
        		error:function(data){
        			$that.parents(".lr-body-conBox").append("<label class=\"label-state error\"><i class=\"lr-icon icon-error\"></i>"+JSON.parse(data.responseText).content+"</label>") 
        		}
        		
        	})
        });
        
        $(".btn-yzm").click(function(){
        	var $that = $(this);
        	$.ajax({
        		url:"/code/sms",
        		type:"get",
        		dataType:"json",
        		data:{
        			mobile:$("input[name='username']").val(),
        			imageCode:$("input[name='imageCode']").val(),
        		},
        		success:function(){
        			$that.text("获取成功");
        		},
        		error:function(data){
        			$that.parents(".lr-body-conBox").append("<label class=\"label-state error\"><i class=\"lr-icon icon-error\"></i>"+JSON.parse(data.responseText).content+"</label>") 
        		}
        		
        	})
        });
        
    });
</script>
</body>
</html>